
package algo.math.evaluator.base;

import algo.math.evaluator.base.exceptions.InvalidToken;
import algo.math.evaluator.base.exceptions.UnrecognizedToken;

/**
 * Represent a number base
 */
public interface IBase {
	
	/** Allowed separators. char format */
	public static final char[] SEPARATOR = {',','.'};
	
	/** Allowed separators. String format. */
	public static final String[] SEPARATOR_STRING = {",","."};
	
	/** Allowed white spaces. char format */
	public static final char[] BLANK_CHAR = {' ', '	'};
	
	/** Allowed white spaces. String format. */
	public static final String[] BLANK_STRING = {" ", "	"};
	
	/**
	 * Representation of the number base.
	 *
	 * @return the string
	 */
	@Override
	public String toString();
	
	/**
	 * Representation of the number base.
	 *
	 * @return the string[]
	 */
	public String[] toStringArray();
	
	/**
	 * Weight of a character
	 *
	 * @param variable 
	 * @return int
	 * @throws UnrecognizedToken
	 */
	public int weightOf(char variable) throws UnrecognizedToken;
	
	/**
	 * Weight of a character.
	 *
	 * @throws UnrecognizedToken 
	 */
	public int weightOf(String variable) throws UnrecognizedToken;
	

	public int valueOf(String value)throws UnrecognizedToken; 
	
	public String valueOf(int value);
	
	/**
	 * Value of a character.
	 *
	 * @param value the value
	 * @return the string
	 */
	public String valueOf(double value); 
	
	/**
	 * Sets the base.
	 *
	 * @param base the new base
	 * @throws InvalidToken the invalid token
	 */
	public void setBase (String base)throws InvalidToken;
	
	/**
	 * Checks if is base token.
	 *
	 * @param variable the variable
	 * @return the boolean
	 */
	public Boolean isBaseToken (char variable);
	
	/**
	 * Checks if is separator.
	 *
	 * @param value the value
	 * @return the boolean
	 */
	public Boolean isSeparator (char value);
	
	/**
	 * Checks if is separator.
	 *
	 * @param value the value
	 * @return the boolean
	 */
	public Boolean isSeparator (String value);
	
	/**
	 * Checks if is blank.
	 *
	 * @param value the value
	 * @return the boolean
	 */
	public Boolean isBlank (char value);
	
	/**
	 * Checks if is blank.
	 *
	 * @param value the value
	 * @return the boolean
	 */
	public Boolean isBlank (String value);
	
	/**
	 * Max value.
	 *
	 * @return Max value
	 */
	public String maxValue();
	
	/**
	 * Min value.
	 *
	 * @return max value
	 */
	public String minValue();
	
	/**
	 * Max weight.
	 *
	 * @return max weight
	 */
	public long maxWeight ();
	
	/**
	 * Gets the base10.
	 *
	 * @return the base10
	 */
	public IBase getBase10();

}
